package com.cai.servlet.common.topic;

import com.cai.dao.DetailedTopicDao;
import com.cai.dao.impl.DetailedTopicDaoImpl;
import com.cai.pojo.Topic;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;

/**
 * @author RuoLi
 * 显示知识点标签
 */
@WebServlet(name = "ServletDetailedTopicKnowledgePointTabs", value = "/common/ShowKnowledgePointTabs")
public class ServletShowTopicKnowledgePointTabInfo extends HttpServlet {
    DetailedTopicDao detailedTopicDao = new DetailedTopicDaoImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;charset=utf-8");
        DetailedTopicDao dao = new DetailedTopicDaoImpl();
        String json = dao.getKnowledgePointTabsInfo();
        resp.getWriter().println(json);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doPost(req, resp);
    }
}
